package com.muyu.system.domain.model;

import com.muyu.common.core.web.model.QueryModel;
import com.muyu.system.domain.req.SysMenuListReq;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 参数配置 分页 模型
 */

@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SysMenuPageQueryModel extends QueryModel<SysMenuPageQueryModel> {
    /**
     * 菜单名称
     */
    private String menuName;
    /**
     * 菜单状态（0正常 1停用）
     */
    private String status;

    public static SysMenuPageQueryModel reqBuild(SysMenuListReq sysMenuListReq) {
        SysMenuPageQueryModel sysMenuPageQueryModel = SysMenuPageQueryModel.builder()
                .menuName(sysMenuListReq.getMenuName())
                .status(sysMenuListReq.getStatus())
                .build();
        sysMenuPageQueryModel.domainBuild(sysMenuListReq);
        return sysMenuPageQueryModel;
    }
}
